﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Unis.FMS.Platform.Order.Domain {

	[JsonObject(MemberSerialization.OptIn), Table(Name = "doc_dpt_trip_history_log", DisableSyncStructure = true)]
	public partial class DocDptTripHistoryLog {

		[JsonProperty, Column(Name = "id", DbType = "int", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 实际创建 时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_create_time", DbType = "datetime")]
		public DateTime ActualCreateTime { get; set; }

		/// <summary>
		/// 实际修改时间
		/// </summary>
		[JsonProperty, Column(Name = "actual_update_time", DbType = "datetime")]
		public DateTime ActualUpdateTime { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_user", StringLength = 50, IsNullable = false)]
		public string CreateUser { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[JsonProperty, Column(Name = "created_by", DbType = "int")]
		public int CreatedBy { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "created_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime CreatedTime { get; set; }

		/// <summary>
		/// 设备信息
		/// </summary>
		[JsonProperty, Column(Name = "equipment_information", StringLength = 50, IsNullable = false)]
		public string EquipmentInformation { get; set; }

		[JsonProperty, Column(Name = "event_description", StringLength = 500, IsNullable = false)]
		public string EventDescription { get; set; }

		/// <summary>
		/// 是否删除
		/// </summary>
		[JsonProperty, Column(Name = "is_del", DbType = "int")]
		public int IsDel { get; set; } = 0;

		/// <summary>
		/// 操作： TaskCheckIn TaskCheckOut ....
		/// </summary>
		[JsonProperty, Column(Name = "operate", IsNullable = false)]
		public string Operate { get; set; }

		[JsonProperty, Column(Name = "order_no", StringLength = 50, IsNullable = false)]
		public string OrderNo { get; set; }

		/// <summary>
		/// 如果是DA的话需要系统Android &IOS
		/// </summary>
		[JsonProperty, Column(Name = "os", StringLength = 50, IsNullable = false)]
		public string Os { get; set; }

		[JsonProperty, Column(Name = "package_no", StringLength = 50, IsNullable = false)]
		public string PackageNo { get; set; }

		[JsonProperty, Column(Name = "service_level", DbType = "int(10) unsigned zerofill")]
		public int ServiceLevel { get; set; }

		[JsonProperty, Column(Name = "stop_no", StringLength = 50, IsNullable = false)]
		public string StopNo { get; set; }

		/// <summary>
		/// 来源APP&CP
		/// </summary>
		[JsonProperty, Column(Name = "system_from", StringLength = 50, IsNullable = false)]
		public string SystemFrom { get; set; }

		[JsonProperty, Column(Name = "task_no", StringLength = 50, IsNullable = false)]
		public string TaskNo { get; set; }

		[JsonProperty, Column(Name = "task_type", StringLength = 50, IsNullable = false)]
		public string TaskType { get; set; }

		[JsonProperty, Column(Name = "tracking_no", StringLength = 50, IsNullable = false)]
		public string TrackingNo { get; set; }

		/// <summary>
		/// 触发来源 0:接口 1：job
		/// </summary>
		[JsonProperty, Column(Name = "trigger_source", StringLength = 50, IsNullable = false)]
		public string TriggerSource { get; set; }

		[JsonProperty, Column(Name = "trip_no", StringLength = 50, IsNullable = false)]
		public string TripNo { get; set; }

		/// <summary>
		/// 最后修改人的id
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "int")]
		public int UpdateBy { get; set; } = 0;

		/// <summary>
		/// 最后修改时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime", InsertValueSql = "CURRENT_TIMESTAMP")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 最后修改人
		/// </summary>
		[JsonProperty, Column(Name = "update_user", StringLength = 50, IsNullable = false)]
		public string UpdateUser { get; set; }

		/// <summary>
		/// 如果是DA的话需要version
		/// </summary>
		[JsonProperty, Column(Name = "version", StringLength = 50, IsNullable = false)]
		public string Version { get; set; }

	}

}
